// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Vuex from 'vuex'
import router from './router';

import Vueditor from 'vueditor'
import 'vueditor/dist/style/vueditor.min.css';
let config = {
  toolbar: [
        'removeFormat', 'undo', 'redo', '|', 'code', 'element', 'fontName', 'fontSize', 'foreColor', 'backColor', 'divider', 'bold', 'italic', 'underline', 'strikeThrough',
        'link', 'unLink', 'divider', 'subscript', 'superscript', 'divider', 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull',
        '|', 'indent', 'outdent', 'insertOrderedList', 'insertUnorderedList', '|', 'emoji', 'picture', 'table', '|', 'fullscreen', 'sourceCode', 'markdown'
      ],
  fontName: [
    {val: 'arial black'}, 
    {val: 'times new roman'}, 
    {val: 'Courier New'}
  ],
  fontSize: ['12px', '14px', '16px', '18px', '0.8rem', '1.0rem', '1.2rem', '1.5rem', '2.0rem'],
  uploadUrl: ''
};

Vue.use(Vuex);
Vue.use(Vueditor, config);



import  './util/filter';
import VueBus from 'vue-bus';
Vue.use(VueBus);
//icon组件
//import Icon from 'vue-svg-icon/Icon.vue';
// Vue.component('icon', Icon);

import iView from 'iview'; // 导入组件库  
import 'iview/dist/styles/iview.css'; // 导入样式  
import './assets/css/mytheme/theme.less';
//全局的CSS
import './assets/css/main.less';
iView.iCircle=iView.Circle;
iView.iSwitch=iView.Switch;
iView.iCircle.name='iCircle';
iView.iSwitch.name='iSwitch';
Vue.use(iView);

//vuex store
import store from './store/';
import * as settings from './config/settings.js';
import util from "./util/util"
import cont from "./util/constants";
import lcstore from "./util/store"


Vue.prototype.util = util;
Vue.prototype.ctns = cont;
Vue.prototype.lcstore = lcstore;
Vue.prototype.$setting = settings;


import {Layout,Common} from "./components/";
Vue.component('bread', Layout.Bread);
Vue.component('valicode', Common.Valicode);
Vue.component('ddqr', Common.ddqr);
Vue.component('leftmenu',Layout.LeftMenu)


import axios from './util/axios.js'
Vue.prototype.axios = axios;

Vue.config.errorHandler=function(err,vm,info){
	if(err){
		console.error(err,vm,info)
	}
}

Vue.config.productionTip = false;

import App from './App';

// Vue.mixin({
//   created: function () {
//     var myOption = this.$options.myOption
//     if (myOption) {
//       console.log(myOption)
//     }
//   }
// })

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  // template: '<App/>',
  //components: { App },
  render: h => h(App)
})
